package com.chanyachting.emall.domain;

import com.chanyachting.emall.util.MyFile;


/**
 * 首页 “关于我们” 页面对象
 * @author Lenovo
 *
 */
public class AboutUs {
	
	private String path;   //页面文件路径（物理路径）
	
	private String context;  //文件内容
	
	
	
	public AboutUs(){
		
		
	}
	
	
	
	public AboutUs(String path){
		
		if(path!=null && !path.trim().equals("")){
			
			this.path=path;
			
			this.setContext(MyFile.readeFile(path));
			
		}

	}
	
	

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getContext() {
		return context;
	}

	public void setContext(String context) {
		this.context = context;
	}
	
	
	/**
	 * 修改文件内容
	 * @return
	 */
	public boolean update(){
		
		return MyFile.writeFile(this.getPath(), this.getContext());
	}
	
	

}
